# -*- python -*-
# Copyright (c) 2011 The Native Client Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

Import('env')

simple_srpc_test_nexe = env.ComponentProgram(
    'simple_srpc_test',
    ['simple_srpc_test.c'],
    EXTRA_LIBS=['srpc',
                'imc',
                'imc_syscalls',
                'platform',
                'gio',
                '${PTHREAD_LIBS}',
                '${NONIRT_LIBS}'])
node = env.CommandSelLdrTestNacl(
    'simple_srpc_test_nexe.out', simple_srpc_test_nexe,
    # Pass '-a' to enable imc_socketpair().
    sel_ldr_flags=['-a'])
env.AddNodeToTestSuite(node, ['small_tests'], 'run_simple_srpc_test_nexe')

types_srpc_test_nexe = env.ComponentProgram(
    'types_srpc_test',
    ['types_srpc_test.c'],
    EXTRA_LIBS=['srpc',
                'imc',
                'imc_syscalls',
                'platform',
                'gio',
                '${PTHREAD_LIBS}',
                '${NONIRT_LIBS}'])
node = env.CommandSelLdrTestNacl(
    'types_srpc_test_nexe.out', types_srpc_test_nexe,
    # Pass '-a' to enable imc_socketpair().
    sel_ldr_flags=['-a'])
env.AddNodeToTestSuite(node, ['small_tests'], 'run_types_srpc_test_nexe')
